<?php
namespace app\admin\controller;

use app\common\model\News as NewsModel;

/**
 * 资讯控制器
 * Class News
 * @package app\index\controller
 */
class News extends Base
{
    /**
     * [get  获取一条]
     * @param
     * @return mixed|\think\response\Json
     * @author [C。]
     */
    public function get()
    {
        $param = input('param.');
        $model = new NewsModel;
        try{
            $data = $model->findData($param['id'],'id','content');
        }catch(\Exception $e){
            return admin_json(-1, '获取失败'.$e->getMessage());
        }
        return admin_json(1,'获取成功',$data);
    }
}